package cube;

/**
 * @author charmgil
 */

// Point: taken from VideoCube by Sergey A. Malenkov
public class Point {

    package var x: Number;
    package var y: Number;
    package var z: Number;

    public function rotateX(cos, sin) {
        var tmp = cos * y - sin * z;
        z = cos * z + sin * y;
        y = tmp;
    }

    public function rotateY(cos, sin) {
        var tmp = cos * x + sin * z;
        z = cos * z - sin * x;
        x = tmp;
    }

    public function rotateZ(cos, sin) {
        var tmp = cos * x - sin * y;
        y = cos * y + sin * x;
        x = tmp;
    }

}

